<?php
	include 'db.php'; //database config and connection
	$magDesc = $_POST['magDesc']; // get MAG Description
	$phCode = $_POST['phCode']; // get PH Code
	$itemName = $_POST['itemName']; //get item
	$itemDesc = $_POST['itemDesc']; //get description
	//$itemGrp = $_POST['itemGrp']; // get item group
	$itemPrice = $_POST['itemPrice']; // get item price
	$watts	= $_POST['watts']; // get watts
	$chw = $_POST['chw']; // get Comparable Halogen Wattage
	$socket = $_POST['socket']; // get Socket
	
	$bshape = $_POST['bshape']; // get Bulb Shape
	$binsten = $_POST['binsten']; // get Beam Intensity
	$bangle = $_POST['lifetime']; //  get Beam Angle
	$dimmable = $_POST['dimmable']; // get Dimmable
	$lumout = $_POST['lumout']; // get Lumen Output
	$effi = $_POST['effi']; // get Efficacy
	$upp = $_POST['upp']; // get Units Per Pack
	$cri = $_POST['cri']; // get Color Rendering Index
	$colorTemp = $_POST['colorTemp']; // get Color Temperature
	$nc = $_POST['nc']; //12NC 929000
	
	
	 
 	//@mysql_query("insert into items(sessionId, itemName, itemDesc, grpID, itemPrice, wattage, halogenWatt, socket) values('" . $id_session . "', $itemName, $itemDesc, $itemGrp, $itemPrice, $watts, $chw, $socket)"); 
	
$query = "INSERT INTO items (magDesc, phCode, itemName, itemDesc, itemPrice, wattage, halogenWatt, socket, beamInt, beamAngle, lifetime, dimmable, lumenOutput, efficacy, unitsPerPack, colorRendering, colorTemp, NC) values ('$magDesc','$phCode','$itemName', '$itemDesc', '$itemPrice', '$watts', '$chw', '$socket','$bshape','$binsten','$bangle', '$dimmable', '$lumout','$effi','$upp','$cri','$colorTemp','$nc')";
@mysql_query($query);
	// echo "query : ".$query;
	//echo  " ".$itemName." ". $itemDesc." ".$itemGrp." ".$itemPrice." ".$watts." ".$chw." ".$socket;
	header("Location: adminpage.php?view=1&stat=addsuccess");
?>
